#ifndef PLANE3D_H_
#define PLANE3D_H_

#pragma once

#include "Point3d.h"
#include "Vector3d.h"

namespace Geometry
  {
  class Plane3d
    {
    public:
      // 
      Plane3d(double i_a, double i_b, double i_c, double i_d);
      
      // by point and norm-vector
      Plane3d(const Point3d& i_point, const Vector3d& i_norm);

      // by 3 points
      Plane3d(const Point3d& i_point_1, const Point3d& i_point_2, const Point3d& i_point_3);

      Vector3d GetNormVector() const;
      bool ContainsPoint(const Point3d& i_point) const;

      double GetCoefD() const;

    private:
      double m_a;
      double m_b;
      double m_c;
      double m_d;
    };

  bool operator == (const Plane3d& i_left, const Plane3d& i_right);
  }

#endif